const mongoose = require('mongoose')

//创建管理员集合
const adminSchema = mongoose.Schema({
    adminName: {
      type: String,
      required: true,
      unique: true
    },
    password: {
      type: String,
      required: true
    },
    regTime: {
      type: String,
      required: true
    },
    loginTime: {
      type: String,
      require: true,
      default: "----"
    },
    status: {
      type: Number,
      require: true,
      default: 0
    }
  });
//根据这个约束对象创建一个管理员列表的集合
const adminModel = mongoose.model("adminList", adminSchema);

module.exports = adminModel;